<?php

namespace seecms\lib\builder\toolbar;

use seecms\lib\builder\modal\Dialog;
use seecms\SeeLang;

class CreateToolbar extends Toolbar
{
    protected $text = 'create';

    protected $url = 'create';

    protected $type = 'modal';

    protected $size = '500,500';

    protected $icon = 'layui-icon layui-icon-addition';

    public static function init(string $text = 'create'): Toolbar
    {
        return parent::init($text);
    }

    public function getDialog(): Dialog
    {
        return $this->dialog ?: Dialog::init(SeeLang::btn('create'))->areaMiddle();
    }
}